﻿using System;
using System.Collections;
using System.Collections.Generic;
using Pathfinding;
using UnityEngine;

namespace NpcFramework
{
    [RequireComponent(typeof(Seeker))]
    public class PveNpcSeeker : NpcSeeker
    {
        [Header("最小到达记录，当到达点周围没有其它Agent时选择此值")]
        [Range(0,1f)]
        public float minReachedDistance = 0.1f;
        [Header("最大到达记录，用于做容差")]
        public float maxReachedDistance = 1f;
        
        [Range(0.1f,1f)]
        public float rvoRadius = 0.5f;            // rvo半径
        [Range(0,5f)]
        public float speed = 2.0f;                // 基础速度
        [Range(0,2f)]
        public float speedPlus = 0.5f;            // 超过其它人的速度叠加变量
        
        // TODO 其它rvo参数
        
        private Seeker seeker;

        private void Awake()
        {
            seeker = GetComponent<Seeker>();
            
        }

        public override bool ReachedEndOfPath()
        {
            // TODO minReachedDistance
            
            
            
            return true;
        }


#if UNITY_EDITOR
        private void OnValidate()
        {
            if (maxReachedDistance < minReachedDistance)
            {
                maxReachedDistance = minReachedDistance;
            }
        }
#endif

    }
}


